/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package mahasiswa;

/**
 *
 * @author fidel
 */
public class mhs {
    private String nama;
    private String nim;

    /**
     * @return the nama
     */
    public String getNama() {
        return nama;
    }

    /**
     * @param nama the nama to set
     */
    public void setNama(String nama) {
        this.nama = nama;
    }

    /**
     * @return the nim
     */
    public String getNim() {
        return nim;
    }

    /**
     * @param nim the nim to set
     */
    public void setNim(String nim) throws Exception {
        if (nim.length() == 9) {
            this.nim = nim;
        } else {
            throw new Exception("NIM harus 9 digit..!");
        }
    }

    
}
